using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using CollegeShop.Infrastructure.Entities.Repository;

namespace CollegeShop.Infrastructure.Entities.Entity
{
    public class Fundsreport : IAccessible<T_Fundsreport, Fundsreport>, ILogicEntity<T_Fundsreport, Fundsreport>
    {
        public int ID { get; set; }

        public string Year { get; set; }

        public string Month { get; set; }

        public decimal PayableMoney { get; set; }

        public decimal PayedMoney { get; set; }

        public decimal SaledMoney { get; set; }

        public decimal SalaryMoney { get; set; }

        public decimal OtherMoney { get; set; }

        public decimal RunMoney { get; set; }

        protected override void Covariant(T_Fundsreport model)
        {
            if (model != null)
            {
                    this.ID = model.ID;
                    this.Year = model.Year;
                    this.Month = model.Month;
                    this.PayableMoney = model.PayableMoney;
                    this.PayedMoney = model.PayedMoney;
                    this.SaledMoney = model.SaledMoney;
                    this.SalaryMoney = model.SalaryMoney;
                    this.OtherMoney = model.OtherMoney;
                    this.RunMoney = model.RunMoney;
            }
}
        protected override T_Fundsreport Inverter(Fundsreport model)
        {
            if (model != null)
            {
                return new T_Fundsreport()
                {
                    ID = model.ID,
                    Year = model.Year,
                    Month = model.Month,
                    PayableMoney = model.PayableMoney,
                    PayedMoney = model.PayedMoney,
                    SaledMoney = model.SaledMoney,
                    SalaryMoney = model.SalaryMoney,
                    OtherMoney = model.OtherMoney,
                    RunMoney = model.RunMoney,
                };
            }
            return null;
        }
        public Fundsreport Set(T_Fundsreport dbModel)
        {
            Covariant(dbModel);
            return this;
        }
    }
}
